<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>库存查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<jsp:include page="../common/easyui.jsp"></jsp:include>
	<script type="text/javascript">
	
	$(function(){
		$('#rs').datagrid({
				iconCls:'icon-save',
				width:1100,
				pagination:true,
				rownumbers:true,
				autoRowHeight: false,
				striped: true,
				collapsible:true,
				url:'stockAction!checkStock.action',
				singleSelect:true,
				fitColumns:true,
				columns:[[
					{field:'posName',title:'网点名称 ',width:180},
					{field:'num',title:'库存数量',width:200,rowspan:2},
					{field:'useNum',title:'使用数量',width:200,rowspan:2},
					{field:'lessNum',title:'剩余数量',width:180,rowspan:2}
				]]
				});
		});
		 function doSearch(id){ 
		 $('#rs').datagrid('load',{    
          peerOrgID: id    
        });    
 	 }  
	</script>

  </head>
  
  <body>
  <div id="searchDiv" class="easyui-panel"  title="库存查询——查询条件" style="background-color:#EBF2FF;" collapsible="true">
		<form id="searchForm" method="post" style="margin-top:10px" action="">
	           <table >
					<tr>
						<td width="5%" align="right">
							<div style="font-family:微软雅黑;font-size:12px;">所在机构:</div>
						</td>
						<td>
		 				<select name="peerOrgID" onchange="doSearch(this.value);">
		 				<s:iterator value="termList" id="posorg">
		 				<option value="<s:property value="#posorg.PosID"/>" <s:if test="#posorg.PosID==peerOrgID" >selected="selected"</s:if> >
		 				<s:property value="#posorg.PosName"/></option>
		 				</s:iterator>
		 				</select>
						</td>
					</tr>
					</table>
		 </form>
	</div>
     <div id="birt" class="easyui-panel"  title="查询结果" style="background-color:#EBF2FF;height: 460"  collapsible="true">
	<table id="rs" style="width:auto;overflow:auto" > </table>
	 </div>
  </body>
</html>
